package com.example.take_out_order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author FZ
 * @since 2024-07-09
 */
@Getter
@Setter
@TableName("tb_orders")
public class Orders implements Serializable {


    /**
     * 订单状态 1待付款 2待接单 3已接单 4派送中 5已完成 6已取消
     */
    public static final Integer PENDING_PAYMENT = 1;
    public static final Integer TO_BE_CONFIRMED = 2;
    public static final Integer CONFIRMED = 3;
    public static final Integer DELIVERY_IN_PROGRESS = 4;
    public static final Integer COMPLETED = 5;
    public static final Integer CANCELLED = 6;

    /**
     * 支付状态 0未支付 1已支付 2退款
     */
    public static final Integer UN_PAID = 0;
    public static final Integer PAID = 1;
    public static final Integer REFUND = 2;




    private static final long serialVersionUID = 1L;

    // @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    // @ApiModelProperty("订单号")
    @TableField("number")
    private String number;

    // @ApiModelProperty("订单状态 1待付款 2待接单 3已接单 4派送中 5已完成 6已取消 7退款")
    @TableField("status")
    private Integer status;

    // @ApiModelProperty("下单用户")
    @TableField("user_id")
    private String userId;

    // @ApiModelProperty("地址id")
    @TableField("address_book_id")
    private String addressBookId;

    // @ApiModelProperty("下单时间")
    @TableField("order_time")
    private LocalDateTime orderTime;

    // @ApiModelProperty("结账时间")
    @TableField("checkout_time")
    private LocalDateTime checkoutTime;

    // @ApiModelProperty("支付方式 1微信,2支付宝")
    @TableField("pay_method")
    private Integer payMethod;

    // @ApiModelProperty("支付状态 0未支付 1已支付 2退款")
    @TableField("pay_status")
    private Integer payStatus;

    // @ApiModelProperty("实收金额")
    @TableField("amount")
    private BigDecimal amount;

    // @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    // @ApiModelProperty("手机号")
    @TableField("phone")
    private String phone;

    // @ApiModelProperty("地址")
    @TableField("address")
    private String address;

    // @ApiModelProperty("用户名称")
    @TableField("user_name")
    private String userName;

    // @ApiModelProperty("收货人")
    @TableField("consignee")
    private String consignee;

    // @ApiModelProperty("订单取消原因")
    @TableField("cancel_reason")
    private String cancelReason;

    // @ApiModelProperty("订单拒绝原因")
    @TableField("rejection_reason")
    private String rejectionReason;

    // @ApiModelProperty("订单取消时间")
    @TableField("cancel_time")
    private LocalDateTime cancelTime;

    // @ApiModelProperty("预计送达时间")
    @TableField("estimated_delivery_time")
    private LocalDateTime estimatedDeliveryTime;

    // @ApiModelProperty("配送状态  1立即送出  0选择具体时间")
    @TableField("delivery_status")
    private Boolean deliveryStatus;

    // @ApiModelProperty("送达时间")
    @TableField("delivery_time")
    private LocalDateTime deliveryTime;

    // @ApiModelProperty("打包费")
    @TableField("pack_amount")
    private Integer packAmount;

    // @ApiModelProperty("餐具数量")
    @TableField("tableware_number")
    private Integer tablewareNumber;

    // @ApiModelProperty("餐具数量状态  1按餐量提供  0选择具体数量")
    @TableField("tableware_status")
    private Boolean tablewareStatus;
}
